package com.itheima.dubbo.Controller;

import com.itheima.dubbo.UserInterface;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("user")
public class UserController {

    @DubboReference
    private UserInterface userInterface;

    @GetMapping("hello")
    public String hello(String username) {
        return userInterface.hello(username);
    }
}
